<template>
  <div class="grid gap-2 grid-cols-4">
    <comicCard v-for="(item, index) in list" :key="index" :obj="item" />
  </div>
</template>
<script setup>
import request from "@/axios/http";
import { onMounted, ref } from "vue";
import comicCard from "@/components/comicCard.vue";
const form = ref(JSON.parse(sessionStorage.getItem("user")));
const list = ref([]);
const getList = () => {
  request({
    url: "collect/getAllCollect",
    method: "post",
    data: {
      pageNum: 1,
      pageSize: 50,
      data: {
        username: form.value.username,
      },
    },
  }).then((res) => {
    if (res.code == 200) {
      list.value = res.data;
    }
  });
};
onMounted(() => {
  getList();
});
</script>
<style scoped>
.container {
  margin: 0;
  padding: 0;
}
</style>
<script></script>
